package top.itaso.lib.net.log;

import android.util.Log;

import top.itaso.lib.net.ConfigKeys;
import top.itaso.lib.net.NetInit;


/**
 * @Description:
 * @Author itsdf07
 * @E-Mail 923255742@qq.com
 * @Github https://github.com/itsdf07
 * @Date 2020/11/13
 */
public class LogUtils {
    private static final String TAG = "NetHttp";

    public static void logd(String logMsg) {
        if (!isLog()) {
            return;
        }
        Log.d(TAG, logMsg);
    }

    public static void loge(String logMsg) {
        if (!isLog()) {
            return;
        }
        Log.e(TAG, logMsg);
    }

    public static boolean isLog() {
        return NetInit.getConfiguration(ConfigKeys.NET_LOG.name());
    }
}
